package com.slatch;

import java.util.HashMap;

public enum TypeTerrain {
	FORET("foret", "arbres", "Foret", 2,0,false),
    PLAINE("plaine", "plaine", "Plaine", 1,0,false),
    MONTAGNE("montagne", "montagne", "Montagne", 3,0,false),
    BATIMENT("batiment", "batiment", "Batiment", 2,30,true),
    QG("qg","qg","QuartierGeneral",5,40,true),
    USINE("usine","caserne","Usine",3,30,true),
    
    //eau
    EAU("eau","eau","Eau",1,0,false),
    RIVEBAS("rivebas","rivebas","Eau",1,0,false),
    RIVEHAUT("rivehaut","rivehaut","Eau",1,0,false),
    RIVEDROITE("rivedroite","rivedroite","Eau",1,0,false),
    RIVEGAUCHE("rivegauche","rivegauche","Eau",1,0,false),
    RIVEBASDROITE("rivebasdroite","rivebasdroite","Eau",1,0,false),
    RIVEBASGAUCHE("rivebasgauche","rivebasgauche","Eau",1,0,false),
    RIVEHAUTDROITE("rivehautdroite","rivehautdroite","Eau",1,0,false),
    RIVEHAUTGAUCHE("rivehautgauche","rivehautgauche","Eau",1,0,false),
    
    //Route
    ROUTEHORIZONTAL("routehorizontal","routehorizontale","Route",1,0,false),
    ROUTEVERTICAL("routevertical","routeverticale","Route",1,0,false),
    VIRAGEDROITEBAS("viragedroitebas","routedroitebas","Virage",1,0,false),
    VIRAGEDROITEHAUT("viragedroitehaut","routedroitehaut","Virage",1,0,false),
    VIRAGEGAUCHEBAS("viragegauchebas","routegauchebas","Virage",1,0,false),
    VIRAGEGAUCHEHAUT("viragegauchehaut","routegauchehaut","Virage",1,0,false),
    ROUTETHAUT("routethaut","routethaut","Route",1,0,false),
    ROUTETBAS("routetbas","routetbas","Route",1,0,false),
    ROUTETDROITE("routetdroite","routetdroite","Route",1,0,false),
    ROUTETGAUCHE("routetgauche","routetgauche","Route",1,0,false),
    CARREFOUR("carrefour","routecroisement","Croissement",1,0,false);
	
	private String aNom;
	private String aImage;
	private String aDescription;
	private int aCouverture;
	public HashMap<String,Integer> aCoutDeplacement;
	static final int bonusCouverture = 10;
	private int aPVMax;
	private boolean aDependanceJoueur;
	
	TypeTerrain(final String pNom, final String pImage, final String pDescription, final int pCouverture,final int pPVMax,final boolean pDependance){
		aNom = pNom;
		aDependanceJoueur = pDependance;
		aImage = pImage;
		aDescription = pDescription;
		aCouverture = pCouverture;
		aPVMax = pPVMax;
		aCoutDeplacement = new HashMap<String,Integer> ();
		
		if(aNom.equals("foret")) {
			aCoutDeplacement.put("roues",30);
			aCoutDeplacement.put("chenilles",80);
			aCoutDeplacement.put("pied",20);
			aCoutDeplacement.put("naval",30);
			aCoutDeplacement.put("aerien",80);
			aCoutDeplacement.put("amphibie",20);
		}
		else if(aNom.equals("plaine")) {
			aCoutDeplacement.put("roues",10);
			aCoutDeplacement.put("chenilles",10);
			aCoutDeplacement.put("pied",10);
			aCoutDeplacement.put("naval",30);
			aCoutDeplacement.put("aerien",80);
			aCoutDeplacement.put("amphibie",20);				
		}
		else if(aNom.equals("montagne")) {
			aCoutDeplacement.put("roues",80);
			aCoutDeplacement.put("chenilles",90);
			aCoutDeplacement.put("pied",30);
			aCoutDeplacement.put("naval",30);
			aCoutDeplacement.put("aerien",80);
			aCoutDeplacement.put("amphibie",20);
		}
		else if(aNom.equals("batiment")) {
			aCoutDeplacement.put("roues",10);
			aCoutDeplacement.put("chenilles",10);
			aCoutDeplacement.put("pied",10);
			aCoutDeplacement.put("naval",30);
			aCoutDeplacement.put("aerien",80);
			aCoutDeplacement.put("amphibie",20);
		}
		else if(aNom.equals("usine")) {
			aCoutDeplacement.put("roues",10);
			aCoutDeplacement.put("chenilles",10);
			aCoutDeplacement.put("pied",10);
			aCoutDeplacement.put("naval",30);
			aCoutDeplacement.put("aerien",80);
			aCoutDeplacement.put("amphibie",20);
		}
		else if(aNom.equals("eau") || 
				aNom.equals("rivebas") ||
				aNom.equals("rivehaut") ||
				aNom.equals("rivedroite") || 
				aNom.equals("rivegauche") ||
				aNom.equals("rivebasgauche") || 
				aNom.equals("rivebasdroite") ||
				aNom.equals("rivehautdroite") || 
				aNom.equals("rivehautdroite")) {
			aCoutDeplacement.put("roues",999);
			aCoutDeplacement.put("chenilles",999);
			aCoutDeplacement.put("pied",999);
			aCoutDeplacement.put("naval",999);
			aCoutDeplacement.put("aerien",999);
			aCoutDeplacement.put("amphibie",20);
		}
		else {
			aCoutDeplacement.put("roues",7);
			aCoutDeplacement.put("chenilles",7);
			aCoutDeplacement.put("pied",10);
			aCoutDeplacement.put("naval",999);
			aCoutDeplacement.put("aerien",10);
			aCoutDeplacement.put("amphibie",10);
		}
	}
	
	public String getNom() {return aNom;}
	public String getImage() {return aImage;}
	public void setImage(final String pStr) {aImage=pStr;}
	public String getDescription() {return aDescription;}
	public int getCouverture() {return aCouverture;}
	public int getPVMax() {return aPVMax;}
	public boolean getDependance() {return aDependanceJoueur;}
}
